import cv2

img = cv2.imread("../images/lena.png")
cv2.imshow("image", img)

resize_img = cv2.resize(
    img,
    dsize=(0, 0),  # dsize=(0,0)表示让函数根据fx和fy参数自动计算目标尺寸
    fx=0.5,
    fy=0.5
)

cv2.imshow("resize_img", resize_img)
cv2.waitKey(0)